package com.micro.modual.extension;

import com.micro.common.MicroConstant;
import com.micro.common.biz.GeneratorCodeUtil;
import com.micro.common.util.SnowFlakeUtil;
import com.micro.modual.entity.Assemble;
import com.micro.modual.model.bo.assemble.AssembleBO;

/**
 * <h1>拼团表 延展类</h1>
 *
 * @author LevelCoder
 * @version V1.0.0
 * @email LevelCoder@126.com
 * @date 2020-08-04 00:23:27
 */
public class AssembleExtension {

    /**
     * <h2>转换: 拼团表 新增</h2>
     *
     * @param assembleBO {@link AssembleBO} 拼团表 新增/修改 请求对象
     * @return {@link Assemble} 拼团表
     */
    public static Assemble converAddAssemble(AssembleBO assembleBO) {
        Assemble assemble = new Assemble();
        assemble.setId(SnowFlakeUtil.getId());
        return assemble;
    }

    /**
     * <h2>转换: 拼团表 修改</h2>
     *
     * @param assembleBO {@link AssembleBO} 拼团表 新增/修改 请求对象
     * @return {@link Assemble} 拼团表
     */
    public static Assemble converEditAssemble(AssembleBO assembleBO) {
        Assemble assemble = new Assemble();
        assemble.setId(assembleBO.getId());
        return assemble;
    }
}
